<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$Title}-{$WebName}</title>
<include file="Public:meta" />
<script type="text/javascript" src="{$WebPublic}jquery/jquery.form.js"></script>
<script type=text/javascript>
	$(document).ready(function(){
		$("#MemberCode").click( ChangeVerify );
		
		function ChangeVerify(){
			var timenow = new Date().getTime();
		    $("#MemberCode").attr("src", "{$Url}memberCode/d/" + timenow);
		};
		
		$('#frmLogin').ajaxForm({
			success: complete,
			dataType: 'json'
		});
		
		function complete(data){
			if (data.status==0){ //登录失败
				ChangeVerify();
				alert(data.info);
            }else{
				var referer = "{$Think.server.HTTP_REFERER}"
				if( referer.length <= 0 || referer.indexOf("public/reg") > -1) referer = "{:WapMemberUrl()}";
				window.location.href = referer;
			}
		};
		
		 $('#frmLogin').submit(function(){
	     	return false;
	     });
	});
</script>
</head>
<body  class="body_article">
	<assign name="ChannelName" value="$Think.lang.UserLogin" />
	<include file="Public:header" />
    <!--主体内容 开始-->
    <div class="article">
    		<ul class="wxlist">
                <li>
                    <div class="ChannelName"><h1>{$Think.lang.UserLogin}</h1></div>
            		<form enctype="multipart/form-data" id="frmLogin" method="post" action="{:CheckMemberUrl()}" >
                        <table class="login_table">
                            <tr>
                                <th>{$Think.lang.UserName}</th>
                                <td><input id="MemberName" name="MemberName" type="text" placeholder="{$Think.lang.UserName}/{$Think.lang.Mobile}/{$Think.lang.Email}" class="form_text" /></td>
                            </tr>
                            <tr>
                                <th>{$Think.lang.Password}</th>
                                <td><input class="form_text" name="MemberPassword"  type="password" /></td>
                            </tr>
                            <eq name="MemberLoginVerifyCode" value="1">
                            <tr>
                                <th><b>{$Think.lang.Verifycode}</b></th>
                                <td><input name="MemberCode" type="number" class="form_text_verifycode" maxlength="4" />
                                &nbsp;<img  class="code_image" id="MemberCode" title="{$Think.lang.ChangeVerifycode}" src="{$Url}memberCode/" align="absMiddle" />
                                </td>
                            </tr>
                            </eq>
                            <tr>
                                <td colspan="2" class="operation">
                                     <input class="btn btnLogin" type="submit" name="submit8" value="{$Think.lang.Login}" />
                                     &nbsp;<a href="{:MemberRegUrl()}" target="_self">{$Think.lang.RegNow}</a>&nbsp;&nbsp;
                                     <a href="{:MemberForgetUrl()}" target="_self">{$Think.lang.ForgetPassword}</a>
                                </td>
                            </tr>
                            <tr class="quick_login">
                                <td colspan="2" class="oauth">
                                    <oauthlist id="o" empty="[style].quick_login{display:none;}[/style]">
                                        <a href="{$o.OauthRequestUrl}"><img src="{$WebPublic}Images/oauth/{$o.OauthMark}.png" /></a>
                                    </oauthlist>
                                </td>
                            </tr>
                        </table>
            		</form>
            	</li>
            </ul>
    </div>
    <!--主体内容 结束-->
    <include file="Public:footer" />
</body>
</html>